<template>
  <!--表单子控件的扩展属性维护-->
  <component
    :is="tabComp[_state.itemMeta.kind]"
    v-bind="extendProps"
  ></component>
</template>

<script>
  import { reactive, ref, watch, defineComponent } from 'vue'
  import {
    state,
    extendText,
    extendNumber,
    extendDate,
    extendTime,
    extendFile,
    extendChecks,
    extendSelect,
  } from '../main'

  /**
   * 根据控件类型，加载对应的扩展属性
   */
  export default defineComponent({
    name: 'nf-el-meta-help-item-extend',
    inheritAttrs: false,
    components: {
    },
    props: {
      meta: Object, // 基础控件的属性，传递过来进行维护
      drawerInfo: Object // 操作抽屉的展开与合拢
    },
    setup(props) {

      const _state = state

      const tabComp = {
        10: extendText,
        11: extendNumber,
        12: extendDate,
        13: extendTime,
        14: extendFile,
        15: extendChecks,
        16: extendSelect
      }

      return {
        tabComp,
        _state
      }
    }
  })

</script>